/* *****************************************************************************
Reproduce figures in "When police pull back: Neighborhood-level effects of de-policing on violent and property crime" in Criminology
* w/Jessie Huff, Scott Wolfe, David Pyrooz and Scott Mourtgos
* Written 10/29/21 by JN
* Last updated 11/5/24 by JN
*******************************************************************************/

* Set global that points to where the merged data file is
	global denver "C:\Users\jnix\OneDrive - University of Nebraska at Omaha\Desktop\Denver Replication\Corrected Replication Materials - For Publication\Processed data"
	
* Set global to store the figures
	global figures "C:\Users\jnix\OneDrive - University of Nebraska at Omaha\Desktop\Denver Replication\Corrected Replication Materials - For Publication\Figures"
	
* Call up the merged data file
	use "$denver\merged_data_for_analysis.dta", clear
	
	
* Figure 1: Weekly deviations in crime and police discretionary activity at neighborhood level	
	rename arrest_disorder_wgt_avg_3wk_dev disorder_wgt_avg_3wk_dev

	local vars "violent_wgt_avg_3wk_dev property_wgt_avg_3wk_dev pstop_wgt_avg_3wk_dev vstop_wgt_avg_3wk_dev disorder_wgt_avg_3wk_dev arrest_drug_wgt_avg_3wk_dev"
	foreach i in `vars' {
		bysort week: egen `i'_CITY = median(`i') if year == 2020
		bysort week: egen `i'_90 = pctile(`i') if year == 2020, p(90)
		bysort week: egen `i'_10 = pctile(`i') if year == 2020, p(10)
	}
	
	rename violent_wgt_avg_3wk_dev_CITY violent_city_med
	rename property_wgt_avg_3wk_dev_CITY property_city_med
	rename pstop_wgt_avg_3wk_dev_CITY pstop_city_med
	rename vstop_wgt_avg_3wk_dev_CITY vstop_city_med
	rename disorder_wgt_avg_3wk_dev_CITY disorder_city_med
	rename arrest_drug_wgt_avg_3wk_dev_CITY drug_city_med
	
	rename violent_wgt_avg_3wk_dev_90 violent_city_90
	rename property_wgt_avg_3wk_dev_90 property_city_90
	rename pstop_wgt_avg_3wk_dev_90 pstop_city_90
	rename vstop_wgt_avg_3wk_dev_90 vstop_city_90
	rename disorder_wgt_avg_3wk_dev_90 disorder_city_90
	rename arrest_drug_wgt_avg_3wk_dev_90 drug_city_90
	
	rename violent_wgt_avg_3wk_dev_10 violent_city_10
	rename property_wgt_avg_3wk_dev_10 property_city_10
	rename pstop_wgt_avg_3wk_dev_10 pstop_city_10
	rename vstop_wgt_avg_3wk_dev_10 vstop_city_10
	rename disorder_wgt_avg_3wk_dev_10 disorder_city_10
	rename arrest_drug_wgt_avg_3wk_dev_10 drug_city_10
	
	gen zero = 0 // so that the y-line will appear on top of the neighborhood lines in the figure

	sort weekly
	
	twoway line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 1, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 2, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 3, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 4, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 5, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 6, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 7, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 8, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 9, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 10, lc(gs14) lp(solid) yaxis(1) || ///	
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 11, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 12, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 13, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 14, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 15, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 16, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 17, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 18, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 19, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 20, lc(gs14) lp(solid) yaxis(1) || ///		
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 21, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 22, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 23, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 24, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 25, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 26, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 27, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 28, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 29, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 30, lc(gs14) lp(solid) yaxis(1) || ///		
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 31, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 32, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 33, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 34, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 35, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 36, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 37, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 38, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 39, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 40, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 41, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 42, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 43, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 44, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 45, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 46, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 47, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 48, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 49, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 50, lc(gs14) lp(solid) yaxis(1) || ///	
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 51, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 52, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 53, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 54, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 55, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 56, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 57, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 58, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 59, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 60, lc(gs14) lp(solid) yaxis(1) || ///	
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 61, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 62, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 63, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 64, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 65, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 66, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 67, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 68, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 69, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 70, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 71, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 72, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 73, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 74, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 75, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 76, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 77, lc(gs14) lp(solid) yaxis(1) || ///
	line pstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 78, lc(gs14) lp(solid) yaxis(1) || ///
	line zero week if year == 2020, lc(black) lp(solid) yaxis(1) || ///
	line pstop_city_med week if year == 2020, lc(blue) lp(solid) yaxis(2) || ///
	line pstop_city_90 week if year == 2020, lc(blue) lp(shortdash) yaxis(2) || ///
	line pstop_city_10 week if year == 2020, lc(blue) lp(shortdash) yaxis(2) ///
		xtitle("") xscale(range(1(1)52)) xlabel(1(1)52,nolab nogrid notick) ///
		xline(11, lc(gs0) lp(dash)) xline(22, lc(gs0) lp(dash)) ///
		yscale(range(-60(20)40) axis(1)) ylabel(-60(20)40, labs(3) axis(1)) yscale(range(-15(5)10) axis(2)) ylabel(-15(5)10, labs(3) axis(2)) ///
		ytitle("Neighborhood Deviation", size(3) axis(1)) title("{it:Pedestrian Stops}", size(3)) ///
		plotr(margin(0 0 0 0)) graphr(margin(0 2 2 0))  ///
		name(pstop_dev, replace) leg(off) nodraw
	

	twoway line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 1, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 2, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 3, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 4, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 5, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 6, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 7, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 8, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 9, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 10, lc(gs14) lp(solid) yaxis(1) || ///	
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 11, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 12, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 13, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 14, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 15, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 16, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 17, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 18, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 19, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 20, lc(gs14) lp(solid) yaxis(1) || ///		
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 21, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 22, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 23, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 24, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 25, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 26, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 27, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 28, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 29, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 30, lc(gs14) lp(solid) yaxis(1) || ///		
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 31, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 32, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 33, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 34, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 35, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 36, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 37, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 38, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 39, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 40, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 41, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 42, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 43, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 44, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 45, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 46, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 47, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 48, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 49, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 50, lc(gs14) lp(solid) yaxis(1) || ///	
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 51, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 52, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 53, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 54, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 55, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 56, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 57, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 58, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 59, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 60, lc(gs14) lp(solid) yaxis(1) || ///	
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 61, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 62, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 63, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 64, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 65, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 66, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 67, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 68, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 69, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 70, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 71, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 72, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 73, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 74, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 75, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 76, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 77, lc(gs14) lp(solid) yaxis(1) || ///
	line vstop_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 78, lc(gs14) lp(solid) yaxis(1) || ///
	line zero week if year == 2020, lc(black) lp(solid) yaxis(1) || ///
	line vstop_city_med week if year == 2020, lc(blue) lp(solid) yaxis(2) || ///
	line vstop_city_90 week if year == 2020, lc(blue) lp(shortdash) yaxis(2) || ///
	line vstop_city_10 week if year == 2020, lc(blue) lp(shortdash) yaxis(2) ///
		xtitle("") xscale(range(1(3)52)) xlabel(1(1)52,nolab nogrid notick) ///
		xline(11, lc(gs0) lp(dash)) xline(22, lc(gs0) lp(dash)) ///
		yscale(range(-100(50)100) axis(1)) ylabel(-100(50)100, labs(3) axis(1)) yscale(range(-40(20)40) axis(2)) ylabel(-50(25)50, labs(3) axis(2)) ///
		ytitle("City Deviation - 10/50/90th Percentiles", size(2.75) axis(2)) title("{it:Vehicle Stops}", size(3)) ///
		plotr(margin(0 0 0 0)) graphr(margin(-4.4 -4.4 2 0)) ///
		name(vstop_dev, replace) leg(off) nodraw
	

	twoway line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 1, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 2, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 3, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 4, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 5, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 6, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 7, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 8, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 9, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 10, lc(gs14) lp(solid) yaxis(1) || ///	
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 11, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 12, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 13, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 14, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 15, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 16, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 17, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 18, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 19, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 20, lc(gs14) lp(solid) yaxis(1) || ///		
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 21, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 22, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 23, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 24, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 25, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 26, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 27, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 28, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 29, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 30, lc(gs14) lp(solid) yaxis(1) || ///		
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 31, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 32, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 33, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 34, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 35, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 36, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 37, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 38, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 39, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 40, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 41, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 42, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 43, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 44, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 45, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 46, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 47, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 48, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 49, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 50, lc(gs14) lp(solid) yaxis(1) || ///	
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 51, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 52, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 53, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 54, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 55, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 56, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 57, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 58, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 59, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 60, lc(gs14) lp(solid) yaxis(1) || ///	
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 61, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 62, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 63, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 64, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 65, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 66, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 67, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 68, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 69, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 70, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 71, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 72, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 73, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 74, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 75, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 76, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 77, lc(gs14) lp(solid) yaxis(1) || ///
	line arrest_drug_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 78, lc(gs14) lp(solid) yaxis(1) || ///
	line zero week if year == 2020, lc(black) lp(solid) yaxis(1) || ///
	line drug_city_med week if year == 2020, lc(blue) lp(solid) yaxis(2) || ///
	line drug_city_90 week if year == 2020, lc(blue) lp(shortdash) yaxis(2) || ///
	line drug_city_10 week if year == 2020, lc(blue) lp(shortdash) yaxis(2) ///
		xtitle("") xscale(range(1(3)52)) xlabel(1(1)52, nolab nogrid notick) ///
		xline(11, lc(gs0) lp(dash)) xline(22, lc(gs0) lp(dash))  ///
		yscale(range(-15(5)5) axis(1)) ylabel(-15(5)5, labs(3) axis(1)) yscale(range(-6(2)2) axis(2)) ylabel(-6(2)2, labs(3) axis(2)) ///
		ytitle("Neighborhood Deviation", size(3) axis(1)) title("{it:Drug Arrests}", size(3)) ///
		plotr(margin(0 0 0 0)) graphr(margin(0 3.35 2 0))  ///
		name(arrest_drug_dev, replace) leg(off) nodraw
		
		
	twoway line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 1, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 2, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 3, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 4, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 5, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 6, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 7, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 8, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 9, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 10, lc(gs14) lp(solid) yaxis(1) || ///	
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 11, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 12, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 13, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 14, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 15, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 16, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 17, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 18, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 19, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 20, lc(gs14) lp(solid) yaxis(1) || ///		
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 21, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 22, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 23, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 24, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 25, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 26, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 27, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 28, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 29, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 30, lc(gs14) lp(solid) yaxis(1) || ///		
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 31, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 32, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 33, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 34, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 35, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 36, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 37, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 38, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 39, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 40, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 41, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 42, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 43, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 44, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 45, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 46, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 47, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 48, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 49, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 50, lc(gs14) lp(solid) yaxis(1) || ///	
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 51, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 52, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 53, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 54, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 55, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 56, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 57, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 58, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 59, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 60, lc(gs14) lp(solid) yaxis(1) || ///	
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 61, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 62, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 63, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 64, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 65, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 66, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 67, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 68, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 69, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 70, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 71, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 72, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 73, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 74, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 75, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 76, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 77, lc(gs14) lp(solid) yaxis(1) || ///
	line disorder_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 78, lc(gs14) lp(solid) yaxis(1) || ///
	line zero week if year == 2020, lc(black) lp(solid) yaxis(1) || ///
	line disorder_city_med week if year == 2020, lc(blue) lp(solid) yaxis(2) || ///
	line disorder_city_90 week if year == 2020, lc(blue) lp(shortdash) yaxis(2) || ///
	line disorder_city_10 week if year == 2020, lc(blue) lp(shortdash) yaxis(2) ///
		xtitle("") xscale(range(1(3)52)) xlabel(1(1)52, nolab nogrid notick) ///
		xline(11, lc(gs0) lp(dash)) xline(22, lc(gs0) lp(dash))  ///
		yscale(range(-10(5)10) axis(1)) ylabel(-10(5)10, labs(3) axis(1)) yscale(range(-2(1)2) axis(2)) ylabel(-2(1)2, labs(3) axis(2)) ///
		ytitle("City Deviation - 10/50/90th Percentiles", size(2.75) axis(2)) title("{it:Disorder Arrests}", size(3)) ///
		plotr(margin(0 0 0 0)) graphr(margin(0 0 2 0)) ///
		name(disorder_dev, replace) leg(off) nodraw
		
		
twoway line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 1, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 2, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 3, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 4, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 5, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 6, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 7, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 8, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 9, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 10, lc(gs14) lp(solid) yaxis(1) || ///	
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 11, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 12, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 13, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 14, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 15, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 16, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 17, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 18, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 19, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 20, lc(gs14) lp(solid) yaxis(1) || ///		
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 21, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 22, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 23, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 24, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 25, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 26, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 27, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 28, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 29, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 30, lc(gs14) lp(solid) yaxis(1) || ///		
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 31, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 32, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 33, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 34, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 35, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 36, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 37, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 38, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 39, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 40, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 41, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 42, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 43, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 44, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 45, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 46, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 47, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 48, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 49, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 50, lc(gs14) lp(solid) yaxis(1) || ///	
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 51, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 52, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 53, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 54, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 55, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 56, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 57, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 58, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 59, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 60, lc(gs14) lp(solid) yaxis(1) || ///	
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 61, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 62, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 63, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 64, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 65, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 66, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 67, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 68, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 69, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 70, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 71, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 72, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 73, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 74, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 75, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 76, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 77, lc(gs14) lp(solid) yaxis(1) || ///
	line violent_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 78, lc(gs14) lp(solid) yaxis(1) || ///
	line zero week if year == 2020, lc(black) lp(solid) yaxis(1) || ///
	line violent_city_med week if year == 2020, lc(red) lp(solid) yaxis(2) || ///
	line violent_city_90 week if year == 2020, lc(red) lp(shortdash) yaxis(2) || ///
	line violent_city_10 week if year == 2020, lc(red) lp(shortdash) yaxis(2) ///
		xtitle("Week of 2020", size(3)) xscale(range(1(4)52)) xlabel(4(4)52, labs(3) nogrid) xmtick(1(1)52) ///
		xline(11, lc(gs0) lp(dash)) xline(22, lc(gs0) lp(dash))  ///
		yscale(range(-3(1)4) axis(1)) ylabel(-3(1)4, labs(3) axis(1)) yscale(range(-1.5(.5)2) axis(2)) ylabel(-1.5(.5)2, labs(3) axis(2)) ///
		ytitle("Neighborhood Deviation", size(3) axis(1)) title("{it:Violent Crimes}", size(3)) ///
		plotr(margin(0 0 0 0)) graphr(margin(1.2 1.5 0 -2)) ///
		name(violent_dev, replace) leg(off) nodraw
		
		
twoway line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 1, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 2, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 3, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 4, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 5, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 6, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 7, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 8, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 9, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 10, lc(gs14) lp(solid) yaxis(1) || ///	
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 11, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 12, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 13, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 14, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 15, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 16, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 17, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 18, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 19, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 20, lc(gs14) lp(solid) yaxis(1) || ///		
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 21, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 22, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 23, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 24, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 25, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 26, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 27, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 28, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 29, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 30, lc(gs14) lp(solid) yaxis(1) || ///		
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 31, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 32, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 33, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 34, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 35, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 36, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 37, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 38, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 39, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 40, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 41, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 42, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 43, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 44, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 45, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 46, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 47, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 48, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 49, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 50, lc(gs14) lp(solid) yaxis(1) || ///	
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 51, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 52, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 53, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 54, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 55, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 56, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 57, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 58, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 59, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 60, lc(gs14) lp(solid) yaxis(1) || ///	
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 61, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 62, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 63, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 64, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 65, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 66, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 67, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 68, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 69, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 70, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 71, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 72, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 73, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 74, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 75, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 76, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 77, lc(gs14) lp(solid) yaxis(1) || ///
	line property_wgt_avg_3wk_dev week if year == 2020 & neighborhood == 78, lc(gs14) lp(solid) yaxis(1) || ///
	line zero week if year == 2020, lc(black) lp(solid) yaxis(1) || ///
	line property_city_med week if year == 2020, lc(red) lp(solid) yaxis(2) || ///
	line property_city_90 week if year == 2020, lc(red) lp(shortdash) yaxis(2) || ///
	line property_city_10 week if year == 2020, lc(red) lp(shortdash) yaxis(2) ///
		xtitle("Week of 2020", size(3)) xscale(range(1(4)52)) xlabel(4(4)52, labs(3) nogrid) xmtick(1(1)52) ///
		xline(11, lc(gs0) lp(dash)) xline(22, lc(gs0) lp(dash))  ///
		yscale(range(-10(5)25) axis(1)) ylabel(-10(5)25, labs(3) axis(1)) yscale(range(-4(2)10) axis(2)) ylabel(-4(2)10, labs(3) axis(2)) ///
		ytitle("City Deviation - 10/50/90th Percentiles", size(2.75) axis(2)) title("{it:Property Crimes}", size(3)) ///
		plotr(margin(0 0 0 0)) graphr(margin(0 0 0 -2))  ///
		name(property_dev, replace) leg(off) nodraw

	
* Combine into a 3x2 figure
	graph combine pstop_dev vstop_dev arrest_drug_dev disorder_dev violent_dev property_dev, rows(3) ///
	note("*Note: Week 11 = Start of COVID period; Week 22 = Start of FLOYD period", size(1.75) pos(5) margin(0 0 0 2)) name(fig1, replace) nodraw
	
	graph display fig1, ysize(9) xsize(6.5) margins(tiny)
	graph export "$figures\fig1.png", as(png) width(2000) replace
	
/* For text accompanying Figure 1...
	* How many of each of these outcomes occurred in 2020 and the weighted-average prior year? 
	* In each period, what % of the neighborhood-weeks was below 0 for each outcome?  
	* In each period, how many fewer of outcome occurred? 

	preserve
		collapse (sum) pstop_cum vstop_cum arrest_drug_cum arrest_disorder_cum, by(week year)
		
		gen w_pstop_cum16 = pstop_cum * 0.4 if year == 2016
		gen w_pstop_cum17 = pstop_cum * 0.8 if year == 2017
		gen w_pstop_cum18 = pstop_cum * 1.2 if year == 2018
		gen w_pstop_cum19 = pstop_cum * 1.6 if year == 2019
		egen w_pstop_cum_avg = rmean(w_pstop*)
		gen pstop_cum20 = pstop_cum if year == 2020
		
		gen w_vstop_cum16 = vstop_cum * 0.4 if year == 2016
		gen w_vstop_cum17 = vstop_cum * 0.8 if year == 2017
		gen w_vstop_cum18 = vstop_cum * 1.2 if year == 2018
		gen w_vstop_cum19 = vstop_cum * 1.6 if year == 2019
		egen w_vstop_cum_avg = rmean(w_vstop*)
		gen vstop_cum20 = vstop_cum if year == 2020
		
		gen w_arrest_drug_cum16 = arrest_drug_cum * 0.4 if year == 2016
		gen w_arrest_drug_cum17 = arrest_drug_cum * 0.8 if year == 2017
		gen w_arrest_drug_cum18 = arrest_drug_cum * 1.2 if year == 2018
		gen w_arrest_drug_cum19 = arrest_drug_cum * 1.6 if year == 2019
		egen w_arrest_drug_cum_avg = rmean(w_arrest_drug*)
		gen arrest_drug_cum20 = arrest_drug_cum if year == 2020
		
		gen w_arrest_disorder_cum16 = arrest_disorder_cum * 0.4 if year == 2016
		gen w_arrest_disorder_cum17 = arrest_disorder_cum * 0.8 if year == 2017
		gen w_arrest_disorder_cum18 = arrest_disorder_cum * 1.2 if year == 2018
		gen w_arrest_disorder_cum19 = arrest_disorder_cum * 1.6 if year == 2019
		egen w_arrest_disorder_cum_avg = rmean(w_arrest_disorder*)
		gen arrest_disorder_cum20 = arrest_disorder_cum if year == 2020
				
		collapse (mean) w_pstop_cum_avg w_vstop_cum_avg w_arrest_drug_cum_avg w_arrest_disorder_cum_avg (sum) pstop_cum20 vstop_cum20 arrest_drug_cum20 arrest_disorder_cum20, by(week)
		
		list w_pstop_cum_avg pstop_cum20 if week == 10 // Pre-COVID difference
		list w_pstop_cum_avg pstop_cum20 if week == 21 // Subtract total from week 10 for COVID difference
		list w_pstop_cum_avg pstop_cum20 if week == 52 // Subtract total from week 21 for Floyd difference
			// 8202 fewer stops during FLOYD period (8202/78 NHs = 105; 105/31 weeks = 3.39 fewer stops per NH per week)
		
		list w_vstop_cum_avg vstop_cum20 if week == 10 // Pre-COVID difference
		list w_vstop_cum_avg vstop_cum20 if week == 21 // Subtract total from week 10 for COVID difference
		list w_vstop_cum_avg vstop_cum20 if week == 52 // Subtract total from week 21 for Floyd difference
		
		list w_arrest_drug_cum_avg arrest_drug_cum20 if week == 10 // Pre-COVID difference
		list w_arrest_drug_cum_avg arrest_drug_cum20 if week == 21 // Subtract total from week 10 for COVID difference
		list w_arrest_drug_cum_avg arrest_drug_cum20 if week == 52 // Subtract total from week 21 for Floyd difference
		
		list w_arrest_disorder_cum_avg arrest_disorder_cum20 if week == 10 // Pre-COVID difference
		list w_arrest_disorder_cum_avg arrest_disorder_cum20 if week == 21 // Subtract total from week 10 for COVID difference
		list w_arrest_disorder_cum_avg arrest_disorder_cum20 if week == 52 // Subtract total from week 21 for Floyd difference
		
		sum w_arrest_disorder_cum_avg arrest_disorder_cum20 if week == 52
	restore
*/


* APPENDIX FIGURES S1-S2: Neighborhood-level bar charts showing 2020 year-end deviations
	preserve
		collapse (sum) violent_cum property_cum if week == 52, by(neighborhood year)
		
		gen w_violent_cum16 = violent_cum * 0.4 if year == 2016
		gen w_violent_cum17 = violent_cum * 0.8 if year == 2017
		gen w_violent_cum18 = violent_cum * 1.2 if year == 2018
		gen w_violent_cum19 = violent_cum * 1.6 if year == 2019
		egen w_violent_cum_avg = rmean(w_violent*)
		
		gen w_property_cum16 = property_cum * 0.4 if year == 2016
		gen w_property_cum17 = property_cum * 0.8 if year == 2017
		gen w_property_cum18 = property_cum * 1.2 if year == 2018
		gen w_property_cum19 = property_cum * 1.6 if year == 2019
		egen w_property_cum_avg = rmean(w_property*)
		
		gen violent_cum20 = violent_cum if year == 2020
		gen property_cum20 = property_cum if year == 2020

		collapse (mean) w_violent_cum_avg w_property_cum_avg (sum) violent_cum20 property_cum20, by(neighborhood)

		gen nh_vio_dev = violent_cum20 - w_violent_cum_avg
		gen nh_prop_dev = property_cum20 - w_property_cum_avg
		
		sum nh_vio_dev, detail
		sum nh_prop_dev, detail

		graph bar nh_vio_dev, over(neighborhood, sort(1) lab(labs(tiny) angle(45)) axis(off)) blabel(group, pos(outside) orientation(vertical) size(2)) ytitle("Deviation", size(small)) yline(4.1, lp(solid) lc(gs12)) text(5 5 "{it:Median = 4.1}", size(2) c(gs12)) plotr(margin(0 0 5 5))  name(figS1, replace)
		graph display figS1, ysize(6.25) xsize(9) margins(tiny)
		graph export "$figures\figS1.png", as(png) width(2000) replace
		
		graph bar nh_prop_dev, over(neighborhood, sort(1) lab(labs(tiny) angle(45)) axis(off)) blabel(group, pos(outside) orientation(vertical) size(2)) ytitle("Deviation", size(small)) yline(69.75, lp(solid) lc(gs12)) text(78 5.1 "{it:Median = 69.75}", size(2) c(gs12)) yscale(range(-150(100)450)) ylabel(-100(100)400) plotr(margin(0 0 7 5)) name(figS2, replace)
		graph display figS2, ysize(6.25) xsize(9) margins(tiny)
		graph export "$figures\figS2.png", as(png) width(2000) replace
	restore

* APPENDIX FIGURES S3-S4
* Neighborhood random efx of pedestrian stops on crime
	* First, import the .csv files SM produced in R, then put neighborhoods into three bins based on those coefficients.
	** SM made the .csv in long format this time, so first need to conver it to wide
		preserve
			import delimited "$denver\index_2024.05.16.csv", clear varn(1)
			drop v1	
			replace model = "vptotal" if model == "Violent_Ped_Total_Effect"
			replace model = "vprand" if model == "Violent_Ped_Random_Effect"
			replace model = "pptotal" if model == "Property_Ped_Total_Effect"
			replace model = "pprand" if model == "Property_Ped_Random_Effect"
			replace model = "pdtotal" if model == "Property_Drug_Total_Effect"
			replace model = "pdrand" if model == "Property_Drug_Random_Effect"
			reshape wide coefficient, i(neighborhood neighborhood_name) j(model) string
			rename coefficientvptotal Violent_Ped_Total_Effect
			rename coefficientpptotal Property_Ped_Total_Effect
			rename coefficientpdtotal Property_Drug_Total_Effect
			xtile totefx_pedvio_bin = Violent_Ped_Total_Effect, n(3)
			xtile totefx_pedprop_bin = Property_Ped_Total_Effect, n(3)
			xtile totefx_drugprop_bin = Property_Drug_Total_Effect, n(3)
			rename neighborhood_name totalefx_nbhd
			drop coefficientpprand coefficientvprand coefficientpdrand
			save "$denver\fig_s3-s4_data.dta", replace
		restore

	* Now merge these bins into the main file.
		merge m:1 neighborhood using "$denver\fig_s3-s4_data.dta", gen(_merge9)

	* Now put descriptive tables together for each bin
		global descrip "total_pop pct_poverty pct_hs_higher pct_bachelors median_home_value median_hh_income disadvantage pct_black pct_hispanic_any immigration"
		format pct_poverty pct_hs_higher pct_bachelors median_home_value median_hh_income disadvantage pct_black pct_hispanic_any immigration %4.3f
		format median_home_value median_hh_income total_pop %4.0f
			forv n = 1(1)3 {
				display `"pedestrian-violent bin `n'"'
				sum $descrip if totefx_pedvio_bin == `n' & weekly == 3171, format sep(10)
			}
	
	gen dot1 = Violent_Ped_Total_Effect if totefx_pedvio_bin == 1
	gen dot2 = Violent_Ped_Total_Effect if totefx_pedvio_bin == 2
	gen dot3 = Violent_Ped_Total_Effect if totefx_pedvio_bin == 3
	
* Appendix Figure S3: Ordered dot plot showing random efx of pedestrian stops on violent crime		
	graph dot dot1 dot2 dot3, over(neighborhood_key, sort(Violent_Ped_Total_Effect) axis(off)) ytitle("Random + Fixed Effect", size(2.5) margin(0 0 0 0)) yscale(range(-.033(.01).01)) ylabel(-.03(.01).01, grid) blabel(group, pos(outside) orientation(vertical) size(1.9)) leg(off) ndots(0) yline(-.009, lp(solid) lc(gs12)) text(-.008 90 "{it:Fixed Effect = -.009}", size(1.8) c(gs8)) m(1, m(O) msize(vsmall)) m(2, m(O) msize(vsmall)) m(3, m(O) msize(vsmall)) vertical  plotr(margin(0 0 9 9)) name(figS3, replace)
	gr_edit plotregion1.barlabels[74].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[74].DragBy .0018 0
	gr_edit plotregion1.barlabels[73].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[73].DragBy .0018 0
	gr_edit plotregion1.barlabels[72].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[72].DragBy .0018 0
	gr_edit plotregion1.barlabels[71].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[71].DragBy .0018 0
	gr_edit plotregion1.barlabels[70].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[70].DragBy .0018 0
	gr_edit plotregion1.barlabels[69].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[69].DragBy .0018 0
	gr_edit plotregion1.barlabels[68].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[68].DragBy .0018 0
	gr_edit plotregion1.barlabels[67].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[67].DragBy .0018 0
	gr_edit plotregion1.barlabels[66].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[66].DragBy .0018 0
	gr_edit plotregion1.barlabels[65].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[65].DragBy .0018 0
	gr_edit plotregion1.barlabels[64].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[64].DragBy .0018 0
	gr_edit plotregion1.barlabels[63].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[63].DragBy .0018 0
	gr_edit plotregion1.barlabels[62].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[62].DragBy .0018 0
	gr_edit plotregion1.barlabels[61].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[61].DragBy .0018 0
	gr_edit plotregion1.barlabels[60].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[60].DragBy .0018 0
	gr_edit plotregion1.barlabels[59].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[59].DragBy .0018 0
	gr_edit plotregion1.barlabels[58].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[58].DragBy .0018 0
	gr_edit plotregion1.barlabels[57].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[57].DragBy .0018 0
	gr_edit plotregion1.barlabels[56].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[56].DragBy .0018 0
	gr_edit plotregion1.barlabels[55].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[55].DragBy .0018 0
	gr_edit plotregion1.barlabels[54].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[54].DragBy .0018 0
	gr_edit plotregion1.barlabels[53].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[53].DragBy .0018 0
	gr_edit plotregion1.barlabels[52].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[52].DragBy .0018 0
	gr_edit plotregion1.barlabels[51].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[51].DragBy .0018 0
	gr_edit plotregion1.barlabels[50].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[50].DragBy .0018 0
	gr_edit plotregion1.barlabels[49].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[49].DragBy .0018 0
	gr_edit plotregion1.barlabels[48].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[48].DragBy .0018 0
	gr_edit plotregion1.barlabels[47].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[47].DragBy .0018 0
	gr_edit plotregion1.barlabels[46].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[46].DragBy .0018 0	
	gr_edit plotregion1.barlabels[45].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[45].DragBy .0018 0
	gr_edit plotregion1.barlabels[44].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[44].DragBy .0018 0
	gr_edit plotregion1.barlabels[43].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[43].DragBy .0018 0
	gr_edit plotregion1.barlabels[42].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[42].DragBy .0018 0
	gr_edit plotregion1.barlabels[41].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[41].DragBy .0018 0
	gr_edit plotregion1.barlabels[40].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[40].DragBy .0018 0
	gr_edit plotregion1.barlabels[39].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[39].DragBy .0018 0
	gr_edit plotregion1.barlabels[38].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[38].DragBy .0018 0
	graph display figS3, ysize(6.25) xsize(9) margins(tiny)
	graph export "$figures\figS3.png", as(png) width(2000) replace

* T-tests to see if there are significant structural/compositional differences
	* Pedestrian stops-->violent crime
	
	global descrip "total_pop pct_poverty pct_hs_higher pct_bachelors median_home_value_rev median_hh_income_rev disadvantage pct_black pct_hispanic_any immigration"
		
	forval n = 1(1)3 {
		sum $descrip if weekly == 3171 & totefx_pedvio_bin == `n'
	}

	foreach i in $descrip {
		display `" "'
		display `"`i'"'
		ttest `i' if weekly == 3171 & (totefx_pedvio_bin == 1 | totefx_pedvio_bin == 3), by(totefx_pedvio_bin)
		display `" "'
		display `"`i'"'
		ttest `i' if weekly == 3171 & (totefx_pedvio_bin == 1 | totefx_pedvio_bin == 2), by(totefx_pedvio_bin)
		display `" "'
		display `"`i'"'
		ttest `i' if weekly == 3171 & (totefx_pedvio_bin == 2 | totefx_pedvio_bin == 3), by(totefx_pedvio_bin)
	}
		
	* Summarize violent and property crime in 2020 across the three neighborhood bins for pedestrian stop randefx
		preserve	
			collapse (sum) violent property (mean) totefx_pedvio_bin if year == 2020, by(neighborhood)
			tabstat violent, by(totefx_pedvio_bin) s(mean sd min max)
			tabstat property, by(totefx_pedvio_bin) s(mean sd min max)
			ttest violent if totefx_pedvio_bin != 2, by(totefx_pedvio_bin)
			ttest violent if totefx_pedvio_bin != 3, by(totefx_pedvio_bin)
			ttest violent if totefx_pedvio_bin != 1, by(totefx_pedvio_bin)
			ttest property if totefx_pedvio_bin != 2, by(totefx_pedvio_bin)
			ttest property if totefx_pedvio_bin != 3, by(totefx_pedvio_bin)
			ttest property if totefx_pedvio_bin != 1, by(totefx_pedvio_bin)
			sum
		restore
		
	log close
	
* Appendix Figure S4: Ordered dot plot showing random efx of pedestrian stops on property crime across neighborhoods 
	drop dot1 dot2 dot3
	gen dot1 = Property_Ped_Total_Effect if totefx_pedprop_bin == 1
	gen dot2 = Property_Ped_Total_Effect if totefx_pedprop_bin == 2
	gen dot3 = Property_Ped_Total_Effect if totefx_pedprop_bin == 3

	graph dot dot1 dot2 dot3, over(neighborhood_key, sort(Property_Ped_Total_Effect) axis(off)) ytitle("Random + Fixed Effect", size(2.5) margin(0 0 0 0)) yscale(range(-.03(.01).01)) ylabel(-.03(.01).01, grid) blabel(group, pos(outside) orientation(vertical) size(1.9)) leg(off) ndots(0) yline(-.005, lp(solid) lc(gs12)) text(-.004 90 "{it:Fixed Effect = -.005}", size(1.8) c(gs8)) m(1, m(O) msize(vsmall)) m(2, m(O) msize(vsmall)) m(3, m(O) msize(vsmall)) vertical  plotr(margin(0 0 9 3)) name(figS4, replace)
	gr_edit plotregion1.barlabels[66].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[66].DragBy .001 0
	gr_edit plotregion1.barlabels[65].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[65].DragBy .001 0
	gr_edit plotregion1.barlabels[64].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[64].DragBy .001 0
	gr_edit plotregion1.barlabels[63].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[63].DragBy .001 0
	gr_edit plotregion1.barlabels[62].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[62].DragBy .001 0
	gr_edit plotregion1.barlabels[61].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[61].DragBy .001 0
	gr_edit plotregion1.barlabels[60].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[60].DragBy .001 0
	gr_edit plotregion1.barlabels[59].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[59].DragBy .001 0
	gr_edit plotregion1.barlabels[58].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[58].DragBy .001 0
	gr_edit plotregion1.barlabels[57].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[57].DragBy .001 0
	gr_edit plotregion1.barlabels[56].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[56].DragBy .001 0
	gr_edit plotregion1.barlabels[55].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[55].DragBy .001 0
	gr_edit plotregion1.barlabels[54].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[54].DragBy .001 0
	gr_edit plotregion1.barlabels[53].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[53].DragBy .001 0
	gr_edit plotregion1.barlabels[52].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[52].DragBy .001 0
	gr_edit plotregion1.barlabels[51].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[51].DragBy .001 0
	gr_edit plotregion1.barlabels[50].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[50].DragBy .001 0
	gr_edit plotregion1.barlabels[49].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[49].DragBy .001 0
	gr_edit plotregion1.barlabels[48].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[48].DragBy .001 0
	gr_edit plotregion1.barlabels[47].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[47].DragBy .001 0
	gr_edit plotregion1.barlabels[46].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[46].DragBy .001 0
	gr_edit plotregion1.barlabels[45].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[45].DragBy .001 0
	gr_edit plotregion1.barlabels[44].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[44].DragBy .001 0
	gr_edit plotregion1.barlabels[43].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[43].DragBy .001 0
	gr_edit plotregion1.barlabels[42].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[42].DragBy .001 0
	gr_edit plotregion1.barlabels[41].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[41].DragBy .001 0
	gr_edit plotregion1.barlabels[40].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[40].DragBy .001 0
	gr_edit plotregion1.barlabels[39].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[39].DragBy .001 0
	gr_edit plotregion1.barlabels[38].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[38].DragBy .001 0
	gr_edit plotregion1.barlabels[37].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[37].DragBy .001 0
	gr_edit plotregion1.barlabels[36].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[36].DragBy .001 0
	gr_edit plotregion1.barlabels[35].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[35].DragBy .001 0
	gr_edit plotregion1.barlabels[34].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[34].DragBy .001 0
	gr_edit plotregion1.barlabels[33].style.editstyle box_alignment(north) editcopy
	gr_edit plotregion1.barlabels[33].DragBy .001 0
	graph display figS4, ysize(6.25) xsize(9) margins(tiny)
	graph export "$figures\figS4.png", as(png) width(2000) replace
	
* T-tests to see if there are significant structural/compositional differences
	* Pedestrian stops-->property crime
	forv n = 1(1)3 {
		display `"pedestrian-property bin `n'"'
		sum $descrip if totefx_pedprop_bin == `n' & weekly == 3171, format sep(10)
	}
	
	foreach i in $descrip {
		display `" "'
		display `"`i'"'
		ttest `i' if weekly == 3171 & (totefx_pedprop_bin == 1 | totefx_pedprop_bin == 3), by(totefx_pedprop_bin)
		display `" "'
		display `"`i'"'
		ttest `i' if weekly == 3171 & (totefx_pedprop_bin == 1 | totefx_pedprop_bin == 2), by(totefx_pedprop_bin)
		display `" "'
		display `"`i'"'
		ttest `i' if weekly == 3171 & (totefx_pedprop_bin == 2 | totefx_pedprop_bin == 3), by(totefx_pedprop_bin)
	}
		
	* Summarize violent and property crime in 2020 across the three neighborhood bins for pedestrian stop randefx
		preserve	
			collapse (sum) violent property (mean) totefx_pedprop_bin if year == 2020, by(neighborhood)
			tabstat violent, by(totefx_pedprop_bin) s(mean sd min max)
			tabstat property, by(totefx_pedprop_bin) s(mean sd min max)
			ttest violent if totefx_pedprop_bin != 2, by(totefx_pedprop_bin)
			ttest violent if totefx_pedprop_bin != 3, by(totefx_pedprop_bin)
			ttest violent if totefx_pedprop_bin != 1, by(totefx_pedprop_bin)
			ttest property if totefx_pedprop_bin != 2, by(totefx_pedprop_bin)
			ttest property if totefx_pedprop_bin != 3, by(totefx_pedprop_bin)
			ttest property if totefx_pedprop_bin != 1, by(totefx_pedprop_bin)
			sum
		restore
		
